#include "IListener.h"
#include "CSGD_EventSystem.h"

void IListener::addEventToMap(string eventID, vector<string> senderTags)
{
	senderMap.emplace(eventID,senderTags);

	CSGD_EventSystem::GetInstance()->RegisterClient(eventID, this);
}
void IListener::removeEventFromMap(string eventID)
{
	senderMap.erase(eventID);
}
void IListener::removeAllEvents()
{
	senderMap.clear();
}
vector<string>* IListener::getSenderTags(string eventID)
{
	return &senderMap.at(eventID);
}

IListener::~IListener(void)
{
	CSGD_EventSystem::GetInstance()->UnregisterClientAll(this);
}